# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=swayidle
pkgver=1.6
pkgrel=3
pkgdesc="Idle management daemon for Wayland"
url="https://swaywm.org"
arch="all"
license="MIT"
options="!check" # no test suite
makedepends="
	elogind-dev
	meson
	ninja
	scdoc
	wayland-dev
	wayland-protocols
	"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/swaywm/swayidle/archive/$pkgver.tar.gz"

build() {
	abuild-meson \
		-Dlogind=enabled \
		-Dlogind-provider=elogind \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	mv "$pkgdir"/usr/share/fish/vendor_completions.d "$pkgdir"/usr/share/fish/completions
}

sha512sums="c82b0d2aee06f87fd71e9e2208e917c0dc7afe80ab0b782c3165127519445021d8cf363292eee99f939165eb813909f2a4ee74153e776557c6d06672de2c1c82  swayidle-1.6.tar.gz"
